package homework.api.day06;

import java.io.*;

public class FOISDemo {
    public static void main(String[] args) throws IOException {
        File file = new File("hfos.txt");
        FileOutputStream fos = new FileOutputStream(file);
        //只取了一个字节存入文件
        fos.write(-1);
        fos.write(6);
        fos.write(30);
        fos.write(40);
        fos.write(50);
        fos.write(60);
        fos.write(70);
        fos.write(80);
        fos.write(90);
        fos.close();


        FileInputStream fis = new FileInputStream("hfos.txt");
        //只读一个字节，补充前24位0
        int b = fis.read();
        System.out.println(b);

        b = fis.read();
        System.out.println(b);

        fis.close();

    }
}
